package com.shuiyu.cloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author rjw
 * <p>Description:   </p>
 * @time 2021/7/17 13:09
 */

//去指定微服务中调对应的方法，出问题了，找PaymentFallbackServiceImpl
@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT",fallback = PaymentFallbackServiceImpl.class)
public interface PaymentHystrix {

    @GetMapping("/payment/hystrix/OK/{id}")
    public String payment_OK(@PathVariable("id") Integer id);

    @GetMapping("/payment/hystrix/TimeOut/{id}")
    public String payment_TimeOut(@PathVariable("id") Integer id);


}
